package create.singleton;

public class SingleTon {
    //饿汉式，常用
    private static final SingleTon singleTon=new SingleTon();
    private SingleTon() {
    }

    public static SingleTon getSingleTon(){
        return singleTon;
    }

    public void method(){
        System.out.println("这是SingleTon中的一个方法");
    }
}
